package com.demo.testDemo0221;

import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

/**
 * @Author :蕉绿
 * @Date : 2023/2/21 13:13
 * @Version : V1.0
 * @Description :
 */
public class autoTest2 {
    void paramsControl() {
        //创建选项对象,设置浏览器参数
        ChromeOptions options = new ChromeOptions();
        options.addArguments("-headless");
        ChromeDriver driver = new ChromeDriver(options);
        driver.get("https://www.baidu.com");
        driver.findElement(By.cssSelector("#kw")).sendKeys("php");
        driver.findElement(By.cssSelector("#su")).click();
        driver.quit();
    }
}
